package com.friend.chat.page.view.main

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

/**
 *  Fragment 适配器
 * @author gorilla
 */
class MyPagerFragmentAdapter(fm: FragmentManager?, var fragmentList: List<Fragment>) :
    FragmentPagerAdapter(
        fm!!
    ) {
    override fun getItem(position: Int): Fragment {
        return fragmentList[position]
    }

    override fun getCount(): Int {
        return fragmentList.size
    }
}